
module.exports = (app) => {
    class NewsController extends app.Controller {
        * list() {
            const ctx = this.ctx;
            const page = ctx.query.page || 1;
            const list = yield ctx.service.news.list(page);
            yield this.ctx.render('news/list.tpl', {list});
        }
    }

    return NewsController;
}